function myCall(context, ...args) {
  if (!context || context === null) {
    context = window
  }
  let fn = this
  let fnName = Symbol()
  targetObj[fnName] = fn
  return targetObj[fnName](...args)
}


function myApply(context, args) {
  if (!context || context === null) {
    context = window
  }
  let fn = this
  let fnName = Symbol()
  targetObj[fnName] = fn
  return targetObj[fnName](...args)
}


function myBind(oThis, ...args) {
  let fn = this
  let tempFn = function () { }
  let fnBound = function (...rest) {
    return fn.apply(this instanceof tempFn ? this : oThis, args.concat(rest))
  }
  if (fn.prototype) {
    tempFn.prototype = fn.prototype
  }
  fnBound.prototype = new tempFn()
  return fnBound
}

